package com.filebackup.struts.actions;

import com.filebackup.business.ShareService;
import com.filebackup.vo.impl.ShareVo;

public class SubmitShareAction extends FilebackupSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private ShareService shareService;
	private int userId;
	private int folderId;
	
	public String execute() throws Exception{
		ShareVo vo=new ShareVo();
		vo.setFolderId(folderId);
		vo.setShareId(userId);
		shareService.addFolder(vo);
		return SUCCESS;
	}

	public void setShareService(ShareService shareService) {
		this.shareService = shareService;
	}

	public ShareService getShareService() {
		return shareService;
	}


	public void setFolderId(int folderId) {
		this.folderId = folderId;
	}

	public int getFolderId() {
		return folderId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getUserId() {
		return userId;
	}

}
